home *** CD-ROM | disk | FTP | other *** search
- ; $Revision: 2.0 $
- ; $Date: 20 Nov 1992 10:52:32 $
- ;
- declare string ID, Password, Result, Remainder, Original
- declare string Key, KeysPressed, LogonFileName, OneChar
- declare integer Len, Idx, Attempt
-
- wait seconds(1)
- Loop:
- type("<ENTER>")
- ifnot wait text("e:", 5)
- add(Attempt, 1)
- if equal(Attempt, 4) goto LogonFailed
- goto Loop
- endif
- cursor save()
- gosub GetLogonInfo
- cursor restore()
- type("/(ID)<ENTER>")
- ifnot wait prompt("d: ", 60) goto LogonFailed
- type("/(Password)<ENTER>")
- ifnot wait prompt("nd: ", 30) greater(2,1)
- gosub WriteNewScript
- truncate(LogonFileName, ".")
- type("<ALT-M>dm<ENTER>L/(LogonFileName)<ENTER><ALT-C>")
- gosub PostNote
- end()
-
- WriteNewScript:
- set string(Original, ID)
- gosub SlashCheck
- set string(ID, Result)
- set string(Original, Password)
- gosub SlashCheck
- set string(Password, Result)
- unique filename(LogonFileName, "mcilogon.hp")
- write to(LogonFileName)
- write("set integer(I(0),0)")
- write("wait tenths(15)")
- write("Loop:")
- write("type(/"<ENTER>/")")
- write("ifnot wait text(/"e:/", 5)")
- write("add (I(0),1)")
- write("if equal(I(0),4)")
- write("prompt(/"Logon script failed./")")
- write("hangup()")
- write("end()")
- write("endif")
- write("goto Loop")
- write("endif")
- write("type(/"/(ID)<ENTER>/")")
- write("wait prompt(/"d: /", 30)")
- write("type(/"/(Password)<ENTER>/")")
- write("end()")
- write to("")
- return()
-
- GetLogonInfo:
- set string(ID, "∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙")
- set string(Password, "∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙")
- option("use menu colors", yes)
- option("bold", yes)
- position(6,12)
- save screen(8,59)
- draw box(8, 59)
- position(13, 33)
- prompt(" ESC to cancel ")
- option("bold", no)
- position(7, 14)
- prompt("Enter your MCI account information below. The")
- position(8, 14)
- prompt("The LEARNMCI script will create a logon script for you.")
- position(10, 18)
- prompt("MCI user name:")
- position(11, 18)
- prompt("MCI Password:")
- option("bold",yes)
- position(10,33)
- key edit(ID,18)
- if string match(ID, "∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙") goto EscExit
- position(11,32)
- key edit(Password, 18)
- if string match(Password, "∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙∙") goto EscExit
- option("use menu colors", no)
- option("bold", no)
- position(5,12)
- restore screen()
- return()
-
- EscExit:
- option("use menu colors", no)
- option("bold", no)
- restore screen()
- cursor restore()
- hangup()
- end()
-
- SlashCheck:
- set string(Result, "")
- set string(Remainder, Original)
- set integer(Idx, 1)
- ifnot length(Original, Len) return()
- SlashLoop:
- set string(OneChar, Remainder)
- left(OneChar, 1)
- if string match(OneChar, "//")
- set string(Result, "/(Result)////")
- else
- set string(Result, "/(Result)/(OneChar)")
- endif
- ifnot cut(Remainder, OneChar)
- set string(Result, Original)
- return()
- endif
- add(idx, 1)
- if greater(Idx, Len)
- return()
- else
- goto SlashLoop
- endif
-
- PostNote:
- cursor save()
- uppercase(LogonFileName, LogonFileName)
- option("use menu colors", yes)
- option("bold", yes)
- position(6,12)
- save screen(9,59)
- draw box(9, 59)
- position(14, 33)
- prompt(" ESC to continue ")
- option("bold", no)
- position(7, 14)
- prompt("The LEARNMCI script has saved your new logon script")
- position(8, 14)
- prompt("under the name /(LogonFileName). The next time you call,")
- position(9,14)
- prompt("the /(LogonFileName) script will log on for you.")
- position(11,14)
- prompt("You can have HA//5 learn more powerful logon scripts")
- position(12,14)
- prompt("than this by using the method on page 43 of the manual.")
- position(14,34)
- PostLoop:
- ifnot wait key(Key) goto PostLoop
- ifnot string match(Key, "<ESC>")
- prompt("/x07")
- goto PostLoop
- endif
- option("use menu colors", no)
- restore screen()
- cursor restore()
- return()
-
- LogonFailed:
- cursor save()
- option("use menu colors", yes)
- option("bold", yes)
- position(5,12)
- save screen(8,51)
- draw box(8, 51)
- option("bold",no)
- position(7, 14)
- prompt("The logon attempt failed. Maybe the line was")
- position(8, 14)
- prompt("noisy or the account information was incorrect.")
- position(10,20)
- option("bold",yes)
- prompt("Press ESC to resume manual control")
- position(10,19)
- option("bold",no)
- FailedLoop:
- ifnot wait key(Key) goto PostLoop
- ifnot string match(Key, "<ESC>")
- prompt("/x07")
- goto FailedLoop
- endif
- option("use menu colors", no)
- restore screen()
- cursor restore()
- end()
-